package clock;

import display.led.Display;

public class Clock {
    private final Display hour = new Display(24);
    private final Display minute = new Display(60);
    public void start() {
        while (true) {
            minute.increase();
            if (minute.getValue() == 0) {
                hour.increase();
            }
            System.out.printf("%02d:%02d\n",hour.getValue(), minute.getValue());

            if (hour.getValue() == 0 && minute.getValue() == 0) {
                break;
            }
        }
    }
    public static void main(String[] args) {
        Clock clock = new Clock();
        clock.start();
    }
}
